pretty sure this is the best place for the long input, but maybe there's somewhere it swings over less area.  i don't think pivoting the long input over the center of the output is better because the geometry required seems to be bad.

i think 36A is possible but very difficult because the long input swings over where the long input pivoting arms need to go, i'm not going to attempt it but i expect ~top 3 to be 36A.

otherwise, i'm pretty proud of this solve!  this version does the big optimization of doing the earth fire side first, when there's less collision dodging needed